/**
 * @description 旋转的行为验证
 */
import RotateCaptcha from "react-rotate-captcha"
import { get, load, verify } from "./utils/server";

/**
 * 
 * @param { string } param0.theme 主题 light | dark 
 * @returns 
 */
function RotateCaptchaBox({ data, setData, imgUrl, theme = "light" }) {
  let { open, resultEvent } = data
  let closeEvent = () => {
    setData({
      open: false
    })
  }
  return (

    <RotateCaptcha
      open={open}
      onClose={closeEvent}
      theme={theme}
      get={() => get(imgUrl)}
      load={load}
      result={resultEvent}
      verify={verify}
    />
  )

}
export default RotateCaptchaBox